<template>
    <div class="app">
        <a-config-provider
            :locale="zhCN"
            :theme="{
                // 主题令牌：https://www.antdv.com/docs/vue/customize-theme-cn#seedtoken
                token: {
                    // colorPrimary: '#00b96b'
                    // colorPrimary: '#000000',
                    fontFamily: `'Noto Sans SC',sans-serif`
                }
            }"
        >
            <router-view></router-view>
        </a-config-provider>
    </div>
</template>

<script setup lang="ts">
import "dayjs/locale/zh-cn";

import zhCN from "ant-design-vue/es/locale/zh_CN";
import dayjs from "dayjs";

import { useAdminStore } from "./stores/admin";
import { useUserStore } from "./stores/user";

dayjs.locale("zh-cn");

// const appStore = useAppStore();
// appStore.getWebsiteConfig();

useUserStore()
    .tryRestoreUser()
    .then(() => {
        // 蓝色背景打印输出，载入用户信息成功
        console.log("%c载入用户信息成功", "background: #009688; color: #fff; padding: 2px 4px; border-radius: 2px;");
    });
useAdminStore()
    .tryRestoreUser()
    .then(() => {
        console.log(
            "%c载入管理员用户信息成功",
            "background: #009688; color: #fff; padding: 2px 4px; border-radius: 2px;"
        );
    });
</script>

<style scoped lang="scss"></style>
